import 'package:flutter/material.dart';
import 'package:oktoast/oktoast.dart';

import 'home_page.dart';

void main() {
  runApp(const MyApp());
}

/// 主页面
class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    const title = 'Flutter WebSocket';
    return OKToast(
      child: MaterialApp(
        title: title,
        theme: ThemeData(
          //主题色
          primarySwatch: Colors.blue,
          //colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
          //是否使用Material3风格
          useMaterial3: false,
        ),
        home: const HomePage(title: title),
      ),
    );
  }
}
